package com.ruoyi.order.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.order.mapper.ProvinceCityDistrictMapper;
import com.ruoyi.order.domain.ProvinceCityDistrict;
import com.ruoyi.order.service.IProvinceCityDistrictService;
import com.ruoyi.common.core.text.Convert;

/**
 * 省市县数据Service业务层处理
 * 
 * @author ruoyi
 * @date 2022-02-09
 */
@Service
public class ProvinceCityDistrictServiceImpl implements IProvinceCityDistrictService 
{
    @Autowired
    private ProvinceCityDistrictMapper provinceCityDistrictMapper;

    /**
     * 查询省市县数据
     * 
     * @param id 省市县数据主键
     * @return 省市县数据
     */
    @Override
    public ProvinceCityDistrict selectProvinceCityDistrictById(Integer id)
    {
        return provinceCityDistrictMapper.selectProvinceCityDistrictById(id);
    }

    /**
     * 查询省市县数据列表
     * 
     * @param provinceCityDistrict 省市县数据
     * @return 省市县数据
     */
    @Override
    public List<ProvinceCityDistrict> selectProvinceCityDistrictList(ProvinceCityDistrict provinceCityDistrict)
    {
        return provinceCityDistrictMapper.selectProvinceCityDistrictList(provinceCityDistrict);
    }

    /**
     * 新增省市县数据
     * 
     * @param provinceCityDistrict 省市县数据
     * @return 结果
     */
    @Override
    public int insertProvinceCityDistrict(ProvinceCityDistrict provinceCityDistrict)
    {
        return provinceCityDistrictMapper.insertProvinceCityDistrict(provinceCityDistrict);
    }

    /**
     * 修改省市县数据
     * 
     * @param provinceCityDistrict 省市县数据
     * @return 结果
     */
    @Override
    public int updateProvinceCityDistrict(ProvinceCityDistrict provinceCityDistrict)
    {
        return provinceCityDistrictMapper.updateProvinceCityDistrict(provinceCityDistrict);
    }

    /**
     * 批量删除省市县数据
     * 
     * @param ids 需要删除的省市县数据主键
     * @return 结果
     */
    @Override
    public int deleteProvinceCityDistrictByIds(String ids)
    {
        return provinceCityDistrictMapper.deleteProvinceCityDistrictByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除省市县数据信息
     * 
     * @param id 省市县数据主键
     * @return 结果
     */
    @Override
    public int deleteProvinceCityDistrictById(Integer id)
    {
        return provinceCityDistrictMapper.deleteProvinceCityDistrictById(id);
    }
}
